package com.zte.shopping.service;

import com.zte.shopping.entity.Staff;
import com.zte.shopping.entity.User;
import com.zte.shopping.exception.LoginDisabledException;
import com.zte.shopping.exception.NoPromissionException;
import com.zte.shopping.exception.RequestParameterException;
import com.zte.shopping.exception.StaffExistException;

import javax.servlet.http.HttpSession;
import java.util.List;


public interface StaffService {


    public  Boolean  findStaffByLoginName(String loginName);




    /**
     * 管理员登录 根据管理员用户和密码
     * @param loginName
     * @param password
     * @return
     */
    Staff staffLogin(String loginName, String password);

    /**
     * @Author zuti
     * @Description //TODO 管理员列表
     * @Date 16:46 2020/6/28
     * @Param [pageIndex]
     * @return java.util.List<com.zte.shopping.entity.Staff>
     **/
    List<Staff> staffList(Integer pageIndex);

    /**
     * @Author zuti
     * @Description //TODO 查询管理员人数
     * @Date 16:52 2020/6/28
     * @Param []
     * @return int
     **/
    int staffListCount();

    /**
     * @Author zuti
     * @Description //TODO 按条件查询职员列表
     * @Date 21:42 2020/6/28
     * @Param [pageIndex, userName, loginName, phone, email, deptId, isValid]
     * @return java.util.List<com.zte.shopping.entity.User>
     **/
    List<Staff> searchStaffByParmaList(Integer pageIndex, String userName, String loginName, String phone, String email, Integer deptId, Integer isValid);

    int staffListCountByParamList(String userName, String loginName, String phone, String email, Integer deptId, Integer isValid);

    /**
     * @Author zuti
     * @Description //TODO 修改管理员状态
     * @Date 9:03 2020/6/29
     * @Param [staffId, isValid]
     * @return void
     **/
    void modifyStaffStatus(String staffId, String isValid);

    void addStaff(Staff staff, String deptId, HttpSession session) throws StaffExistException, LoginDisabledException, NoPromissionException;

    void modifyStaff(Staff staff, String deptId) throws RequestParameterException;

    Staff findById(String staffId) ;
}
